package com.cwg.dict.stem.model;

import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlTransient;

@XmlAccessorType(XmlAccessType.FIELD)
public class Group {

	@XmlElement(name = "token")
	private List<Token>	fTokens	= new ArrayList<Token>();

	@XmlTransient
	private Section		section;

	public Section getSection() {
		return section;
	}

	public List<Token> getTokens() {
		return fTokens;
	}

	public void setSection(Section section) {
		this.section = section;
	}

	public void setTokens(List<Token> tokens) {
		fTokens = tokens;
	}

	@Override
	public String toString() {
		StringBuilder result = new StringBuilder();
		for (Token token : fTokens) {
			result.append(token.toString());
		}
		return result.toString();

	}
}
